﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutomationView
{
    public class ViewState
    {
        public ViewState(string name)
        {
            this.Name = name;
        }

        public ViewState(string name, Type viewEngineType)
        {
            this.Name = name;
            this.ViewType = viewEngineType;
        }

        public string Name { get; private set; }

        public Type ViewType { get; private set; }

        public override string ToString()
        {
            if (this.ViewType == null) return Name;
            return ViewType.Name + " - " + Name;
        }
        #region Common

        public class Common
        {
            public static readonly ViewState Start = new ViewState("Start");
            public static readonly ViewState End = new ViewState("End");
        }
        #endregion

        #region Customers
        
        public class Customers:Common
        {
            public static readonly ViewState Load = new ViewState("Load");
            public static readonly ViewState Adding = new ViewState("Adding");
        }
        #endregion

        #region Add Customer
        
        public class AddCustomer:Common
        {
            public static readonly ViewState Error = new ViewState("Error");
        }
        #endregion
    }
}
